dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta application wizard.

AC_INIT(js_app, 0.01)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

PKG_CHECK_MODULES(GJS,gtk+-2.0 gjs-gi-1.0)

AC_ARG_VAR([JS_CONFIG], [The js-config program to use])
if test "$ac_cv_env_JS_CONFIG_set" != "set"; then
    AC_PATH_PROG([JS_CONFIG], [js-config], [])
fi

if test -n "$JS_CONFIG"; then
    JS_CFLAGS="$($JS_CONFIG --cflags)"
    JS_LIBS="$($JS_CONFIG --libs)"
    FIREFOX_JS_LIBDIR="$($JS_CONFIG --libdir)"
    JS_PACKAGE=

    # js-config gives almost usable CFLAGS, we must define one of XP_BEOS,
    # XP_OS2, XP_WIN or XP_UNIX
    JS_CFLAGS="$JS_CFLAGS -DXP_UNIX"
    GJS_CFLAGS="$GJS_CFLAGS $JS_CFLAGS"
    GJS_LIBS="$GJS_LIBS $JS_LIBS"
fi


GJS_JS_DIR=`$PKG_CONFIG --variable=jsdir gjs-1.0`
GJS_JS_NATIVE_DIR=`$PKG_CONFIG --variable=jsnativedir gjs-1.0`
AC_SUBST(GJS_JS_DIR)
AC_SUBST(FIREFOX_JS_LIBDIR)
AC_SUBST(GJS_JS_NATIVE_DIR)

AM_PATH_GLIB_2_0()
G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
AC_SUBST(G_IR_SCANNER)
G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
AC_SUBST(G_IR_COMPILER)
G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
AC_SUBST(G_IR_GENERATE)
GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
AC_SUBST(GIRDIR)
TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
AC_SUBST(TYPELIBDIR)

AM_PROG_LIBTOOL

AC_OUTPUT([
Makefile
src/Makefile
])
